import request from "@/utils/request.js";

import { SYSTEM_PATH_SY } from "@/utils/request-path.js";
import { tokenUrl } from "@/utils/request-URI.js";
import { pointInfoConvertURl } from "@/utils/request-URI.js";

// // 登录
// export const toLogin = data => request({
//     url: SYSTEM_PATH_SY + '/api/user/login/login',
//     method: 'post',
//     data
// })
// token登录
export const toLogin = (params) =>
    request({
        url: process.env.VUE_APP_LOGIN_API + "/api/admin/user/info",
        // url:'http://10.37.18.47/api/admin/user/info',
        method: "get",
        params,
    });
// // 根据id查询部门详情/api/admin/dept/getDeptByDeptCode
// export const getDeptDetail = eventId => request({
//     url: `http://10.37.19.16/api/admin/dept/${eventId}`,
// })
// 根据id查询部门详情
export const getDeptDetail = (data) =>
    request({
        url: SYSTEM_PATH_SY + `/api/dept/getDeptByDeptCode/${data.deptCode}`,
        // params: data
    });
// 转换坐标
export const pointInfoConvert = (params) =>
    request({
        url:
            pointInfoConvertURl +
            `/v3/assistant/coordinate/convert?locations=${params}&coordsys=gps`,
    });
